package com.wt.admin.controller;


import com.aizuda.easy.security.code.BasicCode;
import com.aizuda.easy.security.domain.Rep;
import com.wt.admin.config.i18n.MessageHelperConfig;
import com.wt.admin.util.AssertUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequestMapping("/test")
@RestController
public class TestController {

    @GetMapping("msg")
    public Rep<String> msg(){
        String message = MessageHelperConfig.getMessage(BasicCode.BASIC_CODE_401.getCode());
        return Rep.ok(message);
    }

    @GetMapping("msg1")
    public Rep<String> msg1(){
        AssertUtil.objIsNull(null,BasicCode.BASIC_CODE_401);
        return Rep.ok("1");
    }

}
